import '../../interface/chat_room_leaf_interface.dart';

class UserListPageAdminModel extends ChatRoomChangeNotifier {
  @override
  observeMessage(int messageId, data) {}

  @override
  onRootProxyModelCreated() {
    _requestData();
  }

  // ChannelUserListRsp? data;

  _requestData() async {
    // data = (await RtcApi.instance.getChannelUserList(
    //         roomModel.channel!.channelId, 0, 200,
    //         scope: "admin"))
    //     .data;
    // notifyListeners();
  }

  // onItemPressed(BuildContext context, SimpleChannelUser item) {
  //   RoomPersonalDataWidget.show(context, roomModel.channel, item);
  // }

  // cancelAdmin($fixnum.Int64 uid, RtcUserRole role) async {
  //   var updateRule = ChannelChangeRole.create()
  //     ..uid = uid
  //     ..role = role;
  //   var result = await RtcApi.instance.updateChannel(ChannelUpdate.create()
  //     ..channel = roomModel.channel!.channelId
  //     ..changeRole = updateRule);
  //   if (result.isSuccess) {
  //     RLog.d("changeUserRole success", result.toString() ?? "");
  //     _requestData();
  //   }
  // }
}
